#include <stdio.h>
#include <string.h>


char *
simple_memset (char *s, int c, size_t n)
{
  char *r = s, *end = s + n;
  while (r < end)
    *r++ = c;
  return s;
}

char *one_memset(char *s, int c, size_t n)
{
	char *head = s, *end = s + n;
	while(head < end)
		*head++ = c;
	return s;
}


static void _main( void )
{
   char buffer[] = "This is a test of the memset function";

   printf( "Before: %s\n", buffer );
   simple_memset( buffer, '*', 4 );
   printf( "After:  %s\n", buffer );
}